<template>
  <div></div>
</template>
<script lang="tsx">
import { defineComponent, type PropType } from 'vue'
import type { AAA } from './interface'
export default defineComponent({
  name: 'ComponentByOptionSetup',
  props: {
    msg: {
      type: String,
      required: true,
    },
    aaa: {
      type: Object as PropType<AAA>,
      required: false,
    },
  },
  emits: { click: (e: MouseEvent) => {} },
  expose: ['func1'],
  setup(props, ctx) {
    let func1 = (e: MouseEvent) => {
      ctx.emit('click', e)
    }
    ctx.expose({ func1 })
    return () => {
      return (
        <div>
          {props.aaa}
          {props.msg}
        </div>
      )
    }
  },
})
</script>
